// Page.h: interface for the CPage class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PAGE_H__F1ED68AB_5400_42AD_AB40_54290121DE7C__INCLUDED_)
#define AFX_PAGE_H__F1ED68AB_5400_42AD_AB40_54290121DE7C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "User.h"

template<class PageItem>
class CPage  
{
public:
	CPage()
	:	m_ulPageSize(0)
	,	m_ulPageNo(0)
	{}

	CPage(const CPage &page)
	:	m_ulPageSize(page.m_ulPageSize)
	,	m_ulPageNo(page.m_ulPageNo)
	{
		for (int i= 0; i < page.m_arrItems.GetSize(); i++)
		{
			m_arrItems.Add(  page.m_arrItems[i] );
		}
	}

	virtual ~CPage()
	{}

	CPage& operator =(const CPage & page)
	{
		m_ulPageSize = page.m_ulPageSize;
		m_ulPageNo = page.m_ulPageNo;
		for (int i= 0; i < page.m_arrItems.GetSize(); i++)
		{
			m_arrItems.Add(  page.m_arrItems[i] );
		}
		return (*this);
	}

	ULONG m_ulPageNo;
	CArray<PageItem, PageItem&> m_arrItems;
	ULONG m_ulPageSize;
};

#endif // !defined(AFX_PAGE_H__F1ED68AB_5400_42AD_AB40_54290121DE7C__INCLUDED_)
